home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / SegLoad.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  2.4 KB  |  110 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SegLoad.p
  3.  
  4.      Contains:    Segment Loader Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT SegLoad;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SEGLOAD__}
  28. {$SETC __SEGLOAD__ := 1}
  29.  
  30. {$I+}
  31. {$SETC SegLoadIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37.  
  38.  
  39. {$PUSH}
  40. {$ALIGN MAC68K}
  41. {$LibExport+}
  42.  
  43. {$IFC TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM }
  44. {
  45.    CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  46.    and the AppFile data structure and enums are obsolete. 
  47.    They are still supported for writing old style 68K apps, 
  48.    but they are not supported for CFM-based apps.
  49.    Use AppleEvents to determine which files are to be 
  50.    opened or printed from the Finder.
  51. }
  52.  
  53. CONST
  54.     appOpen                        = 0;                            { Open the Document (s) }
  55.     appPrint                    = 1;                            { Print the Document (s) }
  56.  
  57.  
  58. TYPE
  59.     AppFilePtr = ^AppFile;
  60.     AppFile = RECORD
  61.         vRefNum:                INTEGER;
  62.         fType:                    OSType;
  63.         versNum:                INTEGER;                                { versNum in high byte }
  64.         fName:                    Str255;
  65.     END;
  66.  
  67. PROCEDURE CountAppFiles(VAR message: INTEGER; VAR count: INTEGER);
  68. PROCEDURE GetAppFiles(index: INTEGER; VAR theFile: AppFile);
  69. PROCEDURE ClrAppFiles(index: INTEGER);
  70. PROCEDURE GetAppParms(VAR apName: Str255; VAR apRefNum: INTEGER; VAR apParam: Handle);
  71.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  72.     INLINE $A9F5;
  73.     {$ENDC}
  74. {$ENDC}
  75.  
  76. {
  77.    Because PowerPC applications don’t have segments.
  78.    But, in order to allow applications to not have conditionalized
  79.    source code, UnloadSeg is macro'ed away for PowerPC.
  80. }
  81. {$IFC TARGET_CPU_68K }
  82. PROCEDURE UnloadSeg(routineAddr: UNIV Ptr);
  83.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  84.     INLINE $A9F1;
  85.     {$ENDC}
  86. {$ENDC}  {TARGET_CPU_68K}
  87.  
  88.  
  89.  
  90.  
  91. {$IFC OLDROUTINELOCATIONS }
  92. PROCEDURE ExitToShell;
  93.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  94.     INLINE $A9F4;
  95.     {$ENDC}
  96. {$ENDC}  {OLDROUTINELOCATIONS}
  97.  
  98.  
  99.  
  100. {$ALIGN RESET}
  101. {$POP}
  102.  
  103. {$SETC UsingIncludes := SegLoadIncludes}
  104.  
  105. {$ENDC} {__SEGLOAD__}
  106.  
  107. {$IFC NOT UsingIncludes}
  108.  END.
  109. {$ENDC}
  110.